package io;

import java.io.FileOutputStream;
import java.io.IOException;

public class ByteStreamDemo4 {
    public static void main(String[] args) throws IOException {
        //1.创建对象
        FileOutputStream fos= new FileOutputStream("IO/src/test/Set集合");
       //2.写出数据
        String str="kankelaoyezuishuai";
        byte[] bytes=str.getBytes();
        fos.write(bytes);

        //再次写出一个换行符就可以了
        String str2="666";
        byte[] bytes2=str2.getBytes();
        fos.write(bytes2);

        String wrap="6666";
        byte[] bytes1 = wrap.getBytes();
        fos.write(bytes1);

        //3.释放资源
        fos.close();
    }
}
